package com.nick.gateway.service;

import org.springframework.cloud.gateway.route.RouteDefinition;
import org.springframework.context.ApplicationEventPublisherAware;
import org.springframework.http.ResponseEntity;
import reactor.core.publisher.Mono;

/**
 * @ClassName: DynamicRouteService
 * @Descpriction: 动态路由配置类
 * @author: zhangchao
 * @date: 2020/4/30 13:44
 * @version: 1.0
 */
public interface DynamicRouteService extends ApplicationEventPublisherAware {

    /**
     * 增加路由
     */
    void addRoute(RouteDefinition definition);

    /**
     * 更新路由
     */
    void updateRoute(RouteDefinition definition);

    /**
     * 删除路由
     */
    Mono<ResponseEntity<Object>> deleteRoute(String id);
}
